﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Publish.aspx.cs" Inherits="SF.Dict.Web.Publish" %>

<%@ Register Src="UserControls/ucHeader.ascx" TagName="ucHeader" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
	<title>
		<asp:Literal runat="server" ID="ll_title"></asp:Literal></title>
	<meta http-equiv="X-UA-Compatible" content="IE=8" />
	<script type="text/javascript" src="/Common/jquery-1.3.2.js"></script>
	<script type="text/javascript" charset="utf-8" src="/Common/ueditor/editor_config.js"></script>
	<script type="text/javascript" charset="utf-8" src="/Common/ueditor/editor_ui_all.js"></script>
	<link rel="stylesheet" type="text/css" href="/Common/ueditor/themes/default/ueditor.css" />
	<link href="/Common/home.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" charset="utf-8">
		var editor;
		$(document).ready(
			function () {
				editor = new baidu.editor.ui.Editor({
					id: 'editor',
					minFrameHeight: 200,
					toolbars: [['Undo', 'Redo', '|', 'Bold', 'Underline', 'StrikeThrough', 'BlockQuote', '|', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', '|', 'InsertOrderedList', 'InsertUnorderedList', '|', 'Image', 'MultiMenu', 'Link', 'Unlink', '|', 'Source', 'FullScreen']]
				});
				editor.render();

				$('#pb_cancel').click(function () {
					window.history.go(-1);
				});

				$('#pb_submit').bind("click", { fun: publish, check: validcheck, title: "发布成功！", argus: { again: false} }, ShowMiniHint);
			}
		);

		function publish() {
			$.log(editor.getContent());
		}

		function validcheck() {
			$.log(editor.getContent());
			
			return "内容不能为空哦～";
		}

	</script>
</head>
<body>
	<form id="form1" runat="server">
	<div id="wrap">
		<uc1:ucHeader ID="ucHeader1" PageName="publish" runat="server" />
		<div id="content-holder">
			<div id="content">
				<div id="main">
					<div id="publisher" class="publisher clearfix">
						<div id="pb_form">
							<asp:Panel runat="server" ID="pb_text">
								<h2>
									<asp:Literal runat="server" ID="ltl_title"></asp:Literal>
								</h2>
								<asp:Panel runat="server" ID="pb_title" CssClass="title">
									<h3>
										<asp:Literal runat="server" ID="ltl_sectiontitle"></asp:Literal></h3>
									<asp:TextBox runat="server" ID="tb_title" TextMode="SingleLine"></asp:TextBox>
								</asp:Panel>
								<h3>
									内容</h3>
								<div id="editor">
								</div>
								<asp:Panel runat="server" ID="pb_tags" CssClass="tags">
									<h3>
										<asp:Literal runat="server" ID="ltl_sectiontags"></asp:Literal></h3>
									<asp:TextBox runat="server" ID="tb_tags" TextMode="SingleLine"></asp:TextBox>
								</asp:Panel>
							</asp:Panel>
							<div id="pb_button">
								<a id="pb_submit" class="blue-button">发布</a> <a id="pb_cancel" class="gray-button">取消</a>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div id="minipop-holder" class="hide">
			<div id="minipop-action" class="minipop">
				<div class="gray6">
					<div id="minipop-tip">
					</div>
				</div>
				<div class="btn-holder">
					<span><a id="minipop-submit" href="javascript:void(0)" class="action">确定</a></span>&nbsp;&nbsp;
					<span><a href="javascript:void(0)" onclick="HideMiniPop()" class="action">取消</a>
					</span>
				</div>
			</div>
			<div id="minipop-hint" class="minipop hide">
				<div class="gray6">
					<div id="minipop-hint-tip">
					</div>
				</div>
			</div>
		</div>
	</div>
	</form>
</body>
</html>
